.class public Lcom/estrongs/io/archive/sevenzip/e;
.super Les/f80;
.source "SevenZipOutputArchive.java"


# instance fields
.field private e:Ljava/lang/String;

.field private f:Lcom/estrongs/io/archive/sevenzip/a$a;


# direct methods
.method public constructor <init>(Ljava/lang/String;Les/l80;Ljava/lang/String;)V
    .locals 1

    .line 1
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    invoke-direct {p0, p1, p2, v0}, Les/f80;-><init>(Ljava/lang/String;Les/l80;Ljava/util/Map;)V

    .line 2
    iput-object p3, p0, Lcom/estrongs/io/archive/sevenzip/e;->e:Ljava/lang/String;

    return-void
.end method

.method static synthetic a(Lcom/estrongs/io/archive/sevenzip/e;)Les/l80;
    .locals 0

    .line 1
    iget-object p0, p0, Les/f80;->b:Les/l80;

    return-object p0
.end method

.method private static a(Ljava/io/File;Ljava/lang/String;)V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/estrongs/fs/FileSystemException;
        }
    .end annotation

    .line 37
    new-instance v0, Ljava/io/BufferedInputStream;

    new-instance v1, Ljava/io/FileInputStream;

    invoke-direct {v1, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V

    invoke-direct {v0, v1}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;)V

    .line 38
    new-instance p0, Ljava/io/BufferedOutputStream;

    invoke-static {p1}, Lcom/estrongs/fs/impl/local/f;->g(Ljava/lang/String;)Ljava/io/OutputStream;

    move-result-object p1

    invoke-direct {p0, p1}, Ljava/io/BufferedOutputStream;-><init>(Ljava/io/OutputStream;)V

    const/16 p1, 0x2000

    new-array p1, p1, [B

    .line 39
    :goto_0
    :try_start_0
    invoke-virtual {v0, p1}, Ljava/io/InputStream;->read([B)I

    move-result v1

    const/4 v2, -0x1

    if-le v1, v2, :cond_0

    const/4 v2, 0x0

    .line 40
    invoke-virtual {p0, p1, v2, v1}, Ljava/io/OutputStream;->write([BII)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    .line 41
    :cond_0
    invoke-static {v0}, Lcom/estrongs/fs/util/f;->a(Ljava/io/Closeable;)V

    .line 42
    invoke-static {p0}, Lcom/estrongs/fs/util/f;->a(Ljava/io/Closeable;)V

    return-void

    :catchall_0
    move-exception p1

    .line 43
    invoke-static {v0}, Lcom/estrongs/fs/util/f;->a(Ljava/io/Closeable;)V

    .line 44
    invoke-static {p0}, Lcom/estrongs/fs/util/f;->a(Ljava/io/Closeable;)V

    .line 45
    goto :goto_2

    :goto_1
    throw p1

    :goto_2
    goto :goto_1
.end method

.method static synthetic b(Lcom/estrongs/io/archive/sevenzip/e;)Les/l80;
    .locals 0

    .line 1
    iget-object p0, p0, Les/f80;->b:Les/l80;

    return-object p0
.end method


# virtual methods
.method public a(Ljava/util/List;)V
    .locals 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/estrongs/fs/FileSystemException;
        }
    .end annotation

    const-wide/16 v0, 0x0

    .line 2
    iput-wide v0, p0, Les/f80;->c:J

    .line 3
    new-instance v0, Ljava/io/File;

    invoke-virtual {p0}, Les/f80;->a()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 4
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v1

    .line 5
    invoke-virtual {v0}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v2

    invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Lcom/estrongs/fs/impl/local/f;->c(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_1

    if-eqz v1, :cond_0

    .line 6
    invoke-virtual {v0}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v0

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Lcom/estrongs/fs/f;->o(Ljava/lang/String;)Z

    goto :goto_0

    .line 7
    :cond_0
    invoke-virtual {v0}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v0

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/estrongs/fs/impl/local/f;->l(Ljava/lang/String;)Z

    .line 8
    :cond_1
    :goto_0
    new-instance v0, Les/d80;

    iget-object v2, p0, Les/f80;->b:Les/l80;

    invoke-direct {v0, v2}, Les/d80;-><init>(Les/l80;)V

    .line 9
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_1
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_2

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    .line 10
    new-instance v4, Ljava/io/File;

    invoke-direct {v4, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v4}, Les/d80;->a(Ljava/io/File;)V

    goto :goto_1

    .line 11
    :cond_2
    iget-object v2, p0, Les/f80;->b:Les/l80;

    invoke-interface {v2}, Les/j80;->a()Z

    move-result v2

    if-eqz v2, :cond_3

    return-void

    .line 12
    :cond_3
    new-instance v2, Ljava/io/File;

    iget-object v3, p0, Les/f80;->a:Ljava/lang/String;

    invoke-direct {v2, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v2

    .line 13
    iget-object v3, p0, Les/f80;->b:Les/l80;

    invoke-virtual {v0}, Les/d80;->c()J

    move-result-wide v4

    .line 14
    invoke-virtual {v0}, Les/d80;->a()I

    move-result v0

    .line 15
    invoke-interface {v3, v2, v4, v5, v0}, Les/l80;->a(Ljava/lang/String;JI)V

    .line 16
    iget-object v0, p0, Les/f80;->a:Ljava/lang/String;

    invoke-static {v0}, Lcom/estrongs/android/util/h0;->c1(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_4

    .line 17
    new-instance v2, Ljava/io/File;

    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v3

    invoke-virtual {v3}, Landroid/app/Application;->getCacheDir()Ljava/io/File;

    move-result-object v3

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v5, p0, Les/f80;->a:Ljava/lang/String;

    invoke-virtual {v5}, Ljava/lang/String;->getBytes()[B

    move-result-object v5

    invoke-static {v5}, Lcom/estrongs/android/pop/utils/k;->a([B)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v5, ".7z.tmp"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-direct {v2, v3, v4}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    .line 18
    invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v2

    goto :goto_2

    .line 19
    :cond_4
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v3, p0, Les/f80;->a:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, ".tmp"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 20
    :goto_2
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 21
    :try_start_0
    new-instance v4, Lcom/estrongs/io/archive/sevenzip/a$a;

    new-instance v5, Lcom/estrongs/io/archive/sevenzip/e$a;

    invoke-direct {v5, p0}, Lcom/estrongs/io/archive/sevenzip/e$a;-><init>(Lcom/estrongs/io/archive/sevenzip/e;)V

    invoke-direct {v4, p1, v5}, Lcom/estrongs/io/archive/sevenzip/a$a;-><init>(Ljava/util/List;Lcom/estrongs/io/archive/sevenzip/a$d;)V

    iput-object v4, p0, Lcom/estrongs/io/archive/sevenzip/e;->f:Lcom/estrongs/io/archive/sevenzip/a$a;

    .line 22
    invoke-virtual {v3}, Ljava/io/File;->getParent()Ljava/lang/String;

    move-result-object p1

    iget-object v5, p0, Lcom/estrongs/io/archive/sevenzip/e;->e:Ljava/lang/String;

    invoke-virtual {v4, p1, v2, v5}, Lcom/estrongs/io/archive/sevenzip/a$a;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_7

    .line 23
    iget-object p1, p0, Les/f80;->a:Ljava/lang/String;

    invoke-static {p1}, Lcom/estrongs/fs/impl/local/f;->c(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_5

    .line 24
    iget-object p1, p0, Les/f80;->a:Ljava/lang/String;

    invoke-virtual {v1, p1}, Lcom/estrongs/fs/f;->b(Ljava/lang/String;)Z

    .line 25
    :cond_5
    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result p1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    if-eqz p1, :cond_7

    if-eqz v0, :cond_6

    .line 26
    :try_start_1
    iget-object p1, p0, Les/f80;->a:Ljava/lang/String;

    invoke-static {v3, p1}, Lcom/estrongs/io/archive/sevenzip/e;->a(Ljava/io/File;Ljava/lang/String;)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 27
    :try_start_2
    invoke-virtual {v3}, Ljava/io/File;->delete()Z

    goto :goto_3

    :catchall_0
    move-exception p1

    invoke-virtual {v3}, Ljava/io/File;->delete()Z

    .line 28
    throw p1

    .line 29
    :cond_6
    invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, p1}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object p1

    iget-object v0, p0, Les/f80;->a:Ljava/lang/String;

    invoke-virtual {v1, p1, v0}, Lcom/estrongs/fs/f;->a(Lcom/estrongs/fs/g;Ljava/lang/String;)Z
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
    .catchall {:try_start_2 .. :try_end_2} :catchall_1

    .line 30
    :cond_7
    :goto_3
    iget-object p1, p0, Les/f80;->b:Les/l80;

    invoke-interface {p1}, Les/j80;->a()Z

    move-result p1

    if-eqz p1, :cond_8

    .line 31
    invoke-virtual {v3}, Ljava/io/File;->getCanonicalPath()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, p1}, Lcom/estrongs/fs/f;->b(Ljava/lang/String;)Z

    :cond_8
    return-void

    :catchall_1
    move-exception p1

    goto :goto_4

    :catch_0
    move-exception p1

    .line 32
    :try_start_3
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    .line 33
    new-instance v0, Lcom/estrongs/fs/FileSystemException;

    invoke-direct {v0, p1}, Lcom/estrongs/fs/FileSystemException;-><init>(Ljava/lang/Throwable;)V

    throw v0
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    .line 34
    :goto_4
    iget-object v0, p0, Les/f80;->b:Les/l80;

    invoke-interface {v0}, Les/j80;->a()Z

    move-result v0

    if-eqz v0, :cond_9

    .line 35
    invoke-virtual {v3}, Ljava/io/File;->getCanonicalPath()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Lcom/estrongs/fs/f;->b(Ljava/lang/String;)Z

    .line 36
    :cond_9
    goto :goto_6

    :goto_5
    throw p1

    :goto_6
    goto :goto_5
.end method

.method public b()V
    .locals 1

    .line 2
    iget-object v0, p0, Lcom/estrongs/io/archive/sevenzip/e;->f:Lcom/estrongs/io/archive/sevenzip/a$a;

    if-eqz v0, :cond_0

    .line 3
    invoke-virtual {v0}, Lcom/estrongs/io/archive/sevenzip/a;->a()V

    :cond_0
    return-void
.end method
